<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="assetMenu" />
<meta name="nav" content="2" />
<meta name="acc" content="0" />
<title>施工单位</title>
<!--  通用情况下 不引入 js css  表单验证  js 放置到页面中 -->
<%-- ui tabs --%>

<script type="text/javascript"
	src="<c:url value='/ext/ui/jquery-ui-1.8.12.custom.min.js'/>"></script>
<link href="${ctx}/styles/lightness/jquery-ui-1.8.12.custom.css"
	rel="stylesheet" />
<script>
	$(document).ready(function() {
		$("#checkDate").addClass("Wate").bind("click", function() {
			WdatePicker({
				skin : 'whyGreen',
				minDate : '#F{$dp.$D(\'finishDate\')}',
				dateFmt : 'yyyy-MM-dd'
			});
		});
		$("#finishDate").addClass("Wate").bind("click", function() {
			WdatePicker({
				skin : 'whyGreen',
				maxDate : '%y-%M-%d',
				dateFmt : 'yyyy-MM-dd'
			});
		});
		
		$("#inputForm").validate({
			rules:{
				orgName:{
					required:true,
					remote:"constructorg!checkOrgName.action?oldOrgName=${orgName}",
				},
				email:{
					required:true,
					email:true,
				},
				orgNum:{
					maxlength:15,
					remote:"constructorg!checkOrgNum.action?oldOrgNum=${orgNum}",
				},
				postCode:{
					digits:true ,
					maxlength:8,
					minlength:6,
				},
				principal:"required",
				orgTelephone:"required",
				orgAddress:"required"
			},
			messages:{
				orgName:{
					required:"请输入单位名称！",
					remote:"单位名称已存在！",
				},
				email:{
					email:"请输入正确格式的Email!",
				},
				orgNum:{
					maxlength:"不得超过15个字符！",
					remote:"机构代码证不得重复",
				},
				postCode:{
					digits:"必须输入纯数字！",
					maxlength:"不得超过8个字符", 
					minlength:"不得少于6个字符",
				}
			}
		});
		
	});
</script>
</head>
<body>
<form action="constructorg!save.action" method="post" id="inputForm"
	class='yform'>
<div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<ul
	class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all ui-sortable">
	<c:if test="${fn:length(deptId)==0}">
	<li><a id="build" class="ui-state-default ui-corner-top "
		href="${ctx}/project/sign/build!input.action?projectId=${projectId}&contractKind=1">单位信息</a></li>
	</c:if>
	<c:if test="${fn:length(deptId)!=0}">
	<li><a id="build" class="ui-state-default ui-corner-top "
		href="${ctx}/project/org/organization!input.action?id=${organizationId}&projectId=${projectId}&typeId=${typeId}&deptId=${deptId}">单位信息</a></li>
	</c:if>
	<c:if test="${fn:length(id)!=0}">
		<li><a id="design"
		class="ui-state-default ui-corner-top "
		href="${ctx}/project/org/qualification.action?organizationId=${id}&projectId=${projectId}&typeId=${typeId}&deptId=${deptId}">单位资质</a></li>
	<c:if test="${null!=projectId}">
		<c:if test="${fn:length(deptId)!=0}">
		<li><a class="ui-state-default ui-corner-top "
			href="${ctx}/project/sign/org/department.action?deptId=${deptId}&projectId=${projectId}&typeId=${typeId}&organizationId=${organizationId}">部门设置</a></li>
		</c:if>
		<li><a class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active "
			href="${ctx}/project/sign/org/userdepartment.action?organizationId=${organizationId}&projectId=${projectId}&typeId=${typeId}&deptId=${deptId}">人员情况</a></li>
	</c:if>
</c:if>
</ul>
<div id="tabs-1">
<table width="200" class="noborder">
<tr>
		<td>单位名称：</td>
		<td colspan="3"><input id="projKind" name="orgName" type="text"/> 
			<input id="id" name="id" type="hidden" value="${id}" />
			<input name="projectId" type="hidden" value="${projectId}" />
			<input name="typeId" type="hidden" value="${typeId}" /></td>
	</tr>
	<tr>
		<td>主管部门：</td>
		<td colspan="3"> <input name="burderDep" type="text" value="${burderDep}" /></td>
	</tr>
	<tr>
		<td>单位性质：</td>
		<td>
		<pt:code category="3005" name="orgNameSet" toScope="request"></pt:code>
		<s:select name="orgForm" list="#request.orgNameSet" listKey="value" listValue="label"></s:select>		
		</td>
		<td>单位职能：</td>
		<td><input id="functionsOrg" name="functionsOrg" type="text"
			value="${functionsOrg}" /></td>
	</tr>
	<tr>
		<td>负责人:</td>
		<td><input name="principal" type="text" value="${principal}" />
		</td>
		<td>邮政编码：</td>
		<td><input name="postCode" type="text" value="${postCode}" /></td>
	</tr>
	<tr>
		<td>单位电话：</td>
		<td><input id="orgTelephone" name="orgTelephone" type="text"
			value="${orgTelephone}"></input></td>
		<td>传真：</td>
		<td><input id="portraiture" name="portraiture" type="text"
			value="${portraiture}" /></td>
	</tr>
	<tr>
		<td>级别：</td>
		<td><input name="orgLevel" type="text" value="${orgLevel }" /></td>
		<td>电子邮箱：</td>
		<td><input id="orgLevel" name="email" type="text"
			value="${email}" /></td>
	</tr>
	<tr>
		<td>行政级别：</td>
		<td><input id="politicsLevel" name="politicsLevel" type="text"
			value="${politicsLevel}" /></td>
		<td>机构代码证：</td>
		<td><input id="orgNum" name="orgNum" type="text"
			value="${orgNum}" /></td>
	</tr>
	<tr>
		<td>成立时间：</td>
		<td><input id="finishDate" readonly="readonly" name="finishDate"
			value="${finishDate}"/></td>
		<td>考核时间：</td>
		<td><input id="checkDate" readonly="readonly" name="checkDate"
			value="${checkDate}" /></td>
	</tr>
	<tr>
		<td>经费来源：</td>
		<td><input id="moneySource" name="moneySource" type="text"
			value="${moneySource}" /></td>
			<td>单位主页：</td>
		<td><input id="orgHome" name="orgHome" type="text"
			value="${orgHome}" /></td>
	</tr>
	<tr>
		<td>单位地址：</td>
		<td colspan="3"><input name="orgAddress" value="${orgAddress}" /></td>
	</tr>
	<tr>
		<td>基本简况：</td>
		<td colspan="3"><textarea name="basicInfo" rows="3" cols="60">${basicInfo }</textarea></td>
	</tr>
	<tr>
		<td>备注： </td>
		<td colspan="3"><textarea rows="3" cols="60" name="remark">${remark}</textarea> </td>
	</tr>
</table>
</div>
<div class="type-button"><input   type="submit"
	class="submit" value="提交" /> <input   type="button"
	value="取消" class="reset" onclick="window.close()" /></div>
</div>
</form>
</body>
</html>
